# coding=utf-8
from appium.webdriver.common.mobileby import MobileBy
from Base.basepage import BasePage
from common.LoggerUtil import LogUtils

class Asserts_Page(BasePage):
    loc_course_title = (MobileBy.ID, "com.youth.startup:id/text_course_title") # 首页最新课程

    def assert_page(self):
        try:
            loc_title = self.locator(self.loc_course_title).text
            assert loc_title == '最新课程'
        except Exception as e:
            LogUtils.error(f'断言失败：{e}')
            self.take_screenshot("【项目断言失败】截图_")

